﻿@{
    Layout = null;

    var User = ViewBag.User;
    var cfg = ViewBag.Config;

    var title = ViewBag.Title + "";
    if (title != "" && !title.EndsWith(" - ")) { title += " - "; }
    title += cfg.DisplayName;

    var set = NewLife.Cube.CubeSetting.Current;
    var res = set.ResourceUrl;
    if (String.IsNullOrEmpty(res)) res = "/Content";
    res = res.TrimEnd('/');
}

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>@title</title>

    <link rel="stylesheet" href="@res/layui/css/layui.css">
    <link rel="stylesheet" href="@res/layui/css/layui_main_cube.css">
    @*artdialog style*@
    <link href="@res/artDialog/css/ui-dialog.css" rel="stylesheet" />
</head>
<body>
    <div class="layui-layout layui-layout-admin cube-layout-admin">
        <!-- 头部导航 -->
        @await Html.PartialAsync("_Navbar")

        <!-- 左侧导航区域（可配合layui已有的垂直导航）-->
        @await Html.PartialAsync("_Left")

        <!-- 主内容区 -->
        <div class="cube-tab" lay-allowClose="true" lay-filter="cube-layout-tabs">
            <!-- 标签头 -->
            <div class="cube-tab-title">
                <ul class='layui-tab-title'>
                    <li class="layui-this cube-homeHeader" lay-id="@ViewBag.Main">
                        <i class="layui-icon layui-icon-home"></i>
                    </li>
                </ul>
            </div>
            <!-- 标签内容 -->
            <div class="layui-body cube-body cube-tab-content">
                <div class="layui-tab-item layui-show">
                    <iframe src="@ViewBag.Main" frameborder="0" class="cube-iframe"></iframe>
                </div>
            </div>
        </div>

        <!-- 移动端遮罩层 -->
        <div class="layui-index-shade" layui-layer-shade-event="shadeClose"></div>
    </div>

    <script src="@res/layui/layui.js"></script>
    <script src="@res/layui/layui_main_cube.js"></script>
    <!-- JQuery作为一等公民，页面内部随时可能使用 -->
    <script src="@res/js/jquery-3.6.0.min.js"></script>
    @*artDialog*@
    <script src="@res/artDialog/dist/dialog-plus-min.js"></script>
    <script src="@res/artDialog/dist/dialog.new.life.js"></script>
</body>
</html>